<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">
<h:head>
 	<link rel="stylesheet" href="#{facesContext.externalContext.requestContextPath}/resources/css/style.css" ></link>
	<link rel="stylesheet" href="#{facesContext.externalContext.requestContextPath}/resources/css/demos.css" />
</h:head>
<h:body>
   <div id="employepage" class="homepage">
			<table width="100%" cellspacing="0" cellpadding="0" border="0">
				<tr>
					<td width="100%" height="70px"/>
				</tr>
				<tr>
					<td width="90%" height="300px">
						<table width="100%" border="2">
							<tr>
								<td  width="10px" height="50px"/>
								<td  width="90%"><h:form>	<div class="tabs-secondary">
											<ul class="tabs secondary">
									    	
									    	<li>
										   			<h:commandLink action="#{chantierController.retourAuChantier}"  value="Chantiers"/>
										   			</li>
									    		<li>
									    			<h:commandLink  action="#{clientController.retourAuClient}" value="Clients"/> </li>
												<li>
										   			<h:commandLink action="#{associeController.retourAuAssocie}"  value="Associés"/>
										   			</li>
										    	<li>
									    			<h:commandLink  action="#{userController.retourAuUser}" value="Utilisateurs Systeme"/> </li>
									   		
									   		<li>
									    			<h:commandLink  action="#{employeController.retourAEmploye}" value="Employés"/> </li>
									   		
									   		<li>
									    			<h:commandLink  action="#{fournisseurController.retourAuFournisseur}" value="Fournisseurs"/> </li>
									   		
									   		
									   		    	
									    	</ul>
									    	
									    	
									    	
									    	<ul class="tabs secondary">
									    	
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									    	<li></li>
									   		<li><h:commandLink  action="#{employeController.retourACategorie}" value="Catégories Emloyés"/> </li> 
									   		<li><h:commandLink  action="#{employeController.retourAImputation}" value="Imputations"/> </li>
									   		 <li><h:commandLink  action="#{employeController.retourAExportImputation}" value="Export Imputations"/> </li>	
									    	</ul>
									    	
									    	
									    	
									    	
									  </div></h:form> 
								</td>
								<td/>
								
							</tr>
							<tr>
								<td  width="10px" height="50px"/>
								<td  width="90%">
									<h:outputText value="#{msg.welcomeemploye}" styleClass="welcomeAuth" />
								</td>
								<td/>
							</tr>
							<tr>
								<td  width="5px" height="100px"/>
								<td  style="margin:0 auto;">
									<h:form id="eemployeForm">
									<table width="700px">
										<tr>
											<td></td>
											<td></td>
										</tr>
										<tr>
											<td><h:outputLabel value="#{msg.nom}"/></td>
			    							<td><h:inputText id="nomEmploye"
													value="#{employeController.employe.nom}" size="35">
												</h:inputText></td>
											<td/>
											<td><h:outputLabel value="#{msg.prenom}"/></td>
			    							<td><h:inputText id="prenomEmploye"
													value="#{employeController.employe.prenom}" size="35">
												</h:inputText></td>
											<td/>
										</tr>
										<tr>
											<td><h:outputLabel value="#{msg.categorie}"/></td>
			    							<td><h:selectOneMenu 
													value="#{employeController.listCateg}" id="scategEemploye">
													<f:selectItem itemValue="" itemLabel=""/>
													<f:selectItems value="#{employeController.listCateg}" />
												</h:selectOneMenu></td>
											<td/>
											<td><h:outputLabel value="#{msg.salaireJour}"/></td>
			    							<td><h:inputText id="salaireEmploye"
													value="#{employeController.employe.salaireJour}" size="35">
												</h:inputText></td>
											<td/>
											
										</tr>
										<tr>
										<td><h:outputLabel value="#{msg.salaireHeure}"/></td>
			    							<td><h:inputText id="salaireHeureEmploye"
													value="#{employeController.employe.salaireHeure}" size="35">
												</h:inputText></td>
											<td/>
										</tr>
										<tr>
				    						<td/>
				    						<td/>
				    						<td width="10px"/>
				    						<td/>
				    						<td align="center">
				    							<table>
				    								<tr>
				    									<td><h:commandButton  type="reset" value="Reset" /></td>
				    									<td width="10px"/>
				    									<td><h:commandButton  value="Recherche" action="#{employeController.filter}"/></td>
				    									<td width="10px"/>
				    									<td><h:commandButton  action="#{employeController.goToAddEmploye}" value="Ajouter" /></td>
				    								</tr>
				    							</table> 
				    						</td>
										</tr>
									</table>
									</h:form>
								</td>
								<td  width="10px" height="100px">
								</td>
							</tr>
							<tr>
								<td  width="5px" height="200px"/>
								<td>
									<h:form>
										<rich:dataTable style="width:100%;"
											value="#{employeController.listEmployes}" var="var" id="tabEmploye"
											rows="20" rowClasses="even-row, odd-row" styleClass="stable">
											<rich:column style="width:10px; ">
												<f:facet name="header">
													<h:outputText value="#{msg.ctickBox}" />
												</f:facet>
												<h:outputText value="#{var.id}" id="idEemploye" />

											</rich:column>
											<rich:column style="width:200px;">
												<f:facet name="header">
													<h:outputText value="#{msg.cnomEmploye}" />
												</f:facet>
												<h:outputText value="#{var.nom}" id="nomEemploye" />
											</rich:column>
											
											<rich:column style="width:200px;">
												<f:facet name="header">
													<h:outputText value="#{msg.cprenomEmploye}" />
												</f:facet>
												<h:outputText value="#{var.prenom}" id="prenomEemploye" />
											</rich:column>
											<rich:column style="width:200px;">
												<f:facet name="header">
													<h:outputText value="Categorie" />
												</f:facet>
												<h:outputText value="#{var.categorie.libelle}" id="statutEmploye" />
											</rich:column>
											
											<rich:column style="width:10px;">
												<a4j:commandLink styleClass="no-decor" 
														 action="#{employeController.goToImputer}">
													<h:graphicImage value="/resources/images/imputer.gif" 
														alt="edit" title="Imputations Employé" />
													<f:setPropertyActionListener
														target="#{employeController.employe}" value="#{var}" />
												</a4j:commandLink></rich:column>
												
												
											<rich:column style="width:10px;">
												<a4j:commandLink styleClass="no-decor" 
														 action="#{employeController.goToUpdateEmploye}">
													<h:graphicImage value="/resources/images/edit.gif" 
														alt="edit" title="Modifier Employé" />
													<f:setPropertyActionListener
														target="#{employeController.employe}" value="#{var}" />
												</a4j:commandLink></rich:column>
											<rich:column style="width:10px;">
												<a4j:commandLink styleClass="no-decor"
													 action="#{employeController.deleteEmploye}">
													<h:graphicImage value="/resources/images/delete.gif" style="align:center;width : 20px; height : 18px;"
														alt="edit" title="Delete Employe" />
													<f:setPropertyActionListener
														target="#{employeController.employe}" value="#{var}" />
												</a4j:commandLink>
											</rich:column>
										</rich:dataTable>
									</h:form>
								</td>
								<td/>
							</tr>
						</table>
					</td>
				</tr>
			</table>
	</div>
</h:body>
</html>